A two-dimensional (2D) graphic library is used as a core library in a computer operating system, and performance of individual drawing interfaces provided by the 2D graphic library directly affects timeliness of a system to respond to an operation on a user interface (UI). At present, there are two manners of creating a 2D drawing: a central processing unit (CPU) and a graphic processing unit (GPU). In terms of performance, the CPU manner is suitable for simple small-scene drawing, and the GPU manner is suitable for large-scene drawing. A scene in the 2D drawing refers to operational complexity (for example, geometric transformation) and a region size involved in a drawing process. Either adopting the GPU drawing manner for drawing of a small scene or adopting the CPU drawing manner for drawing of a large scene greatly reduces the performance, which directly affects UI performance of the system. Another implementation manner is determined by an application program to which a drawn frame belongs, and a developer can set in the application program whether the GPU manner is adopted for drawing. If the GPU drawing manner is set, the system adopts the GPU manner to draw each frame of content in the application program; otherwise, the CPU manner is adopted for drawing. However, when a manner configured in the application program is adopted, it is still unknown to the developer which one of GPU drawing and CPU drawing is preferable for the application program that is being developed. Therefore, it is inevitable that frames of some complex content are eventually drawn in the CPU manner or some simple frames are drawn in the GPU manner, which also leads to poor performance of the 2D drawing.